package cm.tl.pms.enums.base;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 "1: 是
 0: 否"
 */
@Getter
@AllArgsConstructor(access= AccessLevel.PRIVATE)
public enum PwdTypeEnum implements IEnum {
    NEED_PWD("一级", 1),
    NO_NEED_PWD("二级", 0);
    private final String name;
    private final Integer value;

    public static PwdTypeEnum nameOf(Integer value) {
        for (PwdTypeEnum e : PwdTypeEnum.values()) {
            if (e.value.equals(value)) {
                return e;
            }
        }
        return null;
    }
}
